<%@ page language="java"  pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<meta name="format-detection" content="telephone=no" />
    <title>约来约美 </title>
        <script type="text/javascript">
    function onBridgeReady(){
   	 WeixinJSBridge.call('hideOptionMenu');
   	}
   if (typeof WeixinJSBridge == "undefined"){
   	    if( document.addEventListener ){
   	        document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
   	    }else if (document.attachEvent){
   	        document.attachEvent('WeixinJSBridgeReady', onBridgeReady); 
   	        document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
   	    }
   	}else{
   	    onBridgeReady();
   	}
    </script>
    <link rel="stylesheet" href="${static_host}style/hhframe-1.0.0.css" />
    <link rel="stylesheet" href="${static_host}style/orderform.css" />
    <script src="${static_host}script/jquery-1.11.1.min.js"></script>
    <script src="${static_host}script/jquery.iscroll.5.js"></script>
    <script src="${static_host}script/hhframe-1.0.0.js"></script>
    <script src="${static_host}script/orderform.js"></script>
    <script src="${static_host}js/layer/layer.m.js"></script>
</head>
<body>
  
  <div class="framepage orderform">
    
    <!-- header -->
    <div class="header">
      <a href="${flag==null?'centent!orderlist.do':'javascript:history.back();'}" class="pos-l icon hd-return">返回</a>
      <h1 class="hd-title">订单信息</h1>
    </div>
    
    <!-- content -->
    <div class="wrapper">
    <div class="content">
      <div class="intro">
        <h3>订单详情</h3>
        <p>订单号：${order.order_out}</p>
        <p>支付方式：${order.pay_type=='1'?'网上支付':'到店支付'}</p>
        <p>订单状态：
              <s:if test="order.state==2">已支付</s:if>
       <s:if test="order.state==3">已消费</s:if>
        <s:if test="order.state==5">线下支付</s:if>
         <s:if test="order.state==4">退款中</s:if>
          <s:if test="order.state==6">订单已取消 </s:if>
   </p>
        <hr>
        <p>商铺名称：<a href="store!detail.do?id=${order.store_id}">${order.store_name}</a></p>
        <p>服务名称：${order.item_name}</p>
        <p>预约技师：${order.beautician_name}</p>
        <p>预约时间：<span class="time">${order.start_hour}</span></p>
        <p>消费密码：<span class="time">${pwd}</span></p>
        
        <p class="price">价格：￥${order.price}</p>
        <s:if test="order.state==2 || order.state==5">
        <a href="javascript:;" class="btn cancel">取消订单</a>
        </s:if>
 	
      </div>
    </div>
    </div>
    
  </div>
   <jsp:include page="/inc/userfooter.jsp" />
   <script type="text/javascript">
      $(".cancel").click(function(){
    	layer.open({
    		    title:"取消订单",
    		    content: '您是否确定取消这个订单？',
    		    btn: ['确认', '取消'],
    		    shadeClose: false,
    		    yes: function(){
    		    	window.location.href="centent!changeorder.do?id=${order.order_id}";
    		    	//layer.open({content: '你点了确认', time: 1});
    		    }, no: function(){
    		       // layer.open({content: '你选择了取消', time: 1});
    		    }
    		});
    	  
      })
   </script>
</body>
</html>